package homeworke.question19;

/**
 * Author：毕龙
 * Date: 2024/4/18 19:47
 */
public class Circle extends Shape{
    private double r;

    public Circle(double r) {
        this.r = r;
    }

    @Override
    public double area() {
        return Math.PI*Math.pow(r,2);
    }

    @Override
    public double girth() {
        return 2*Math.PI*r;
    }
}
